@import "_reset.scss";
@import "head.scss";
@import "foot.scss";

%w {
  width: 1220px;
  margin: 0 auto;
}
body {
  background: #fff;
}
img {
  vertical-align: middle;
}

// 主体
.main {
  width: 1220px;
  margin: 0 auto;

  .sort {
    float: left;
    width: 248px;
    height: 800spx;
    h2 {
      font-size: 28px;
      font-weight: 700;
      margin: 15px 5px;
    }
    .line {
      width: 248px;
      height: 1px;
      background: #f4f4f4;
    }
    li {
      line-height: 32px;
      &:hover {
        color: red;
      }
    }

    .range {
      width: 248px;
      height: 28px;
      line-height: 28px;
      background: #000;
      color: #fff;

      span {
        &:nth-of-type(1) {
          float: left;
          margin-left: 10px;
        }
        &:nth-of-type(2) {
          float: right;
          margin-right: 20px;
        }
      }
    }

    .search {
      display: flex;
      align-items: center;
      justify-content: space-around;
      margin: 15px 0;

      input {
        width: 82px;
        height: 24px;
        border: 1px solid #ccc;
        text-indent: 5px;
      }
    }

    .priceRange {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      margin: 15px 0;

      li {
        width: 75px;
        height: 30px;
        line-height: 30px;
        background-color: rgb(244, 244, 244);
        text-align: center;
        margin: 5px 0;
        &:hover {
          color: red;
        }
      }
    }
    .checked {
      font-size: 14px;
      color: grey;
    }
  }
  .goodsWarp {
    float: right;
    width: 930px;
    margin-left: 40px;

    .goodsBar {
      p {
        text-decoration: underline;
      }

      .select {
        height: 34px;
        background: #f4f4f4;
        margin: 30px 0;

        li {
          float: left;
          line-height: 34px;
          padding: 0 20px;

          &:first-child {
            color: #f20015;
          }
        }
      }
    }
    .goodsList {
      li {
        float: left;
        width: 220px;
        height: 320px;
        padding: 12px;
        box-sizing: border-box;
        margin: 0 12px 12px 0;
        transition: all 0.5s;

        &:hover {
          transform: translate3d(0, -2px, 0);
          box-shadow: 0 2px 10px #888;
        }

        img {
          width: 196px;
        }

        p {
          font-size: 14px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          padding: 15px 10px 4px 10px;
          border-top: 1px solid #f6f6f6;
        }

        .price {
          margin-left: 40px;

          > span {
            &:nth-child(1) {
              float: left;
              font-size: 16px;
              color: #e60012;
            }
          }

          .price1 {
            float: left;
            font-size: 12px;
            color: #999;
            margin: 2px 0 0 5px;

            span {
              &:nth-child(2) {
                text-decoration: line-through;
              }
            }
          }
        }

        .color {
          display: inline-block;
          font-size: 12px;
          margin: 10px 0;
        }
      }
    }
  }
}

.w-tips {
  @extend %w;
  height: 45px;
  line-height: 45px;
}
